from scrapy.cmdline import execute
import os
import sys
import requests
import logging

if __name__ == '__main__':
    link = ['https://dnf.qq.com/web2015/down.shtml','https://gaokao.chsi.com.cn/sch/']

    if requests.get(link[0]).status_code == 200:
        print('-----link  exist-------')

        execute(['scrapy', 'crawl', 'DNF'])
    else:
        print('error')